package helper.scxml.scxml2.t0.case1_cycle.zone.c0

import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.CycleEnv.Companion.makeCycleEnv
import helper.scxml.strategy.sNodeUnit.SNodeUnitHelper.ISNodeUnit

object Helper {
    fun c0(
        repeatTimes: Int,
        sNodeUnit: ISNodeUnit,
    ) {
        val zoneEnv = makeCycleEnv()
        val list = zoneEnv.repeatRandomRun(
            aSNU = sNodeUnit,
            repeatTimes = repeatTimes,
        )
        println("repeatTimes = $repeatTimes")
        arrayOf("t", "c").forEach { keyStr ->
            list.map {
                it.endData[keyStr]!!.toDouble()
            }.average().let {
                println("average $keyStr = $it")
            }
        }
    }
}